#ifndef CORE_DIFFUSE_LIGHT_H
#define CORE_DIFFUSE_LIGHT_H
#include "Material.h"
#include "Texture.h"
namespace RayTracer
{
	class DiffuseLight : public Material {
	public:
		DiffuseLight(std::shared_ptr<Texture> a) : emit(a) {}
		DiffuseLight(vec3 c) : emit(std::make_shared<SolidTexture>(c)) {}

		virtual bool Scatter(
			const Ray& r_in, const HitRecord& rec, vec3& attenuation, Ray& scattered
		) const override 
		{
			return false;
		}

		virtual vec3 Emitted(float u, float v, const vec3& p) const override 
		{
			return emit->value(u, v, p);
		}

	public:
		std::shared_ptr<Texture> emit;
	};

}
#endif // !CORE_DIFFUSE_LIGHT_H
